﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZhimeiSoft.CharmManager.DOL
{
    /// <summary>
    /// 预约表
    /// </summary>
    [Serializable()]
    public class DBEntitySchedule : BaseEntity
    {
        /// <summary>
        /// 表名称
        /// </summary>
        /// <returns></returns>
        public override string getTableName()
        {
            return base.getTableName();
        }
        /// <summary>
        /// 预约ID
        /// </summary>
        public int SCHEDUEID { get; set; }
        /// <summary>
        /// 店ID
        /// </summary>
        public int SALONID { get; set; }
        /// <summary>
        /// 计划名称
        /// </summary>
        public string SCHEDULENAME { get; set; }
        /// <summary>
        /// 预约开始时间
        /// </summary>
        public DateTime SCHEDULETIME { get; set; }
        /// <summary>
        /// 系统完成时间 如果预约成功（SOF）系统自动记录当前时间
        /// </summary>
        public DateTime SYSTIME { get; set; }
        /// <summary>
        /// 预约状态 S0P 预约计划中 S0F 预约成功 SOE 预约超时
        /// </summary>
        public string STATE { get; set; }
        /// <summary>
        /// 预约计划开始时间
        /// </summary>
        public DateTime SPLANSTARTTIME { get; set; }
        /// <summary>
        /// 预约计划结束时间
        /// </summary>
        public DateTime SPLANENDTIME { get; set; }
        /// <summary>
        /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
        /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
        /// </summary>
        public string SPLANTIMESTATE { get; set; }
        /// <summary>
        /// 备注说明
        /// </summary>
        public string SPLANMEMO { get; set; }
        /// <summary>
        /// 提醒类型 SC 客户预约 SS 系统提醒 
        /// </summary>
        public string SCHEDULETYPE { get; set; }
        /// <summary>
        /// 计划创建人
        /// </summary>
        public string SPLANEMPLOYEE { get; set; }
        /// <summary>
        /// 字段名
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// 预约ID
            /// </summary>
            public const string SCHEDUEID = "SCHEDUEID";
            /// <summary>
            /// 店ID
            /// </summary>
            public const string SALONID = "SALONID";
            /// <summary>
            /// 计划名称
            /// </summary>
            public const string SCHEDULENAME = "SCHEDULENAME";
            /// <summary>
            /// 预约开始时间
            /// </summary>
            public const string SCHEDULETIME = "SCHEDULETIME";
            /// <summary>
            /// 系统完成时间 如果预约成功（SOF）系统自动记录当前时间
            /// </summary>
            public const string SYSTIME = "SYSTIME";
            /// <summary>
            /// 预约状态 S0P 预约计划中 S0F 预约成功 SOE 预约超时
            /// </summary>
            public const string STATE = "STATE";
            /// <summary>
            /// 预约计划开始时间
            /// </summary>
            public const string SPLANSTARTTIME = "SPLANSTARTTIME";
            /// <summary>
            /// 预约计划结束时间
            /// </summary>
            public const string SPLANENDTIME = "SPLANENDTIME";
            /// <summary>
            /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
            /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
            /// </summary>
            public const string SPLANTIMESTATE = "SPLANTIMESTATE";
            /// <summary>
            /// 备注说明
            /// </summary>
            public const string SPLANMEMO = "SPLANMEMO";
            /// <summary>
            /// 类型SC 客户预约 SS 系统提醒 SE 员工提醒
            /// </summary>
            public const string SCHEDULETYPE = "SCHEDULETYPE";
            /// <summary>
            /// 类型SC 客户预约 SS 系统提醒 
            /// </summary>
            public const string SPLANEMPLOYEE = "SPLANEMPLOYEE";

        }
        /// <summary>
        ///预约状态 S0P 预约计划中 S0F 预约成功 SOE 预约超时
        /// </summary>
        public static class ENUM_STATE
        {
            /// <summary>
            /// S0P 预约计划中
            /// </summary>
            public const string SOP = "SOP";
            /// <summary>
            ///  S0F 预约成功
            /// </summary>
            public const string SOF = "SOF";
            /// <summary>
            /// SOE 预约超时
            /// </summary>
            public const string SOE = "SOE";

            /// <summary>
            /// S0P 预约计划中
            /// </summary>
            public const string SOP_CHINESE = "SOP";
            /// <summary>
            ///  S0F 预约成功
            /// </summary>
            public const string SOF_CHINESE = "SOF";
            /// <summary>
            /// SOE 预约超时
            /// </summary>
            public const string SOE_CHINESE = "SOE";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string enumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { SOP, SOF, SOE };
                string[] sReturnStr = new string[] { SOP_CHINESE, SOF_CHINESE, SOE_CHINESE };
                return BaseEntity.getStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string chineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SOP_CHINESE, SOF_CHINESE, SOE_CHINESE };
                string[] sReturnStr = new string[] { SOP, SOF, SOE };
                return BaseEntity.getStrReturnStr(chineseStr, serchStr, sReturnStr);
            }

        };

        /// <summary>
        /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
        /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
        /// </summary>
        public static class ENUM_SPLANTIMESTATE
        {
            /// <summary>
            /// SH每小时提醒
            /// </summary>
            public const string SH = "SH";
            /// <summary>
            /// SD 每天提醒
            /// </summary>
            public const string SD = "SD";
            /// <summary>
            /// SW 每周提醒
            /// </summary>
            public const string SW = "SW";
            /// <summary>
            /// SM 每月提醒
            /// </summary>
            public const string SM = "SM";
            /// <summary>
            /// SDH 定时提醒
            /// </summary>
            public const string SDH = "SDH";

            /// <summary>
            /// SH每小时提醒
            /// </summary>
            public const string SH_CHINESE = "SH";
            /// <summary>
            /// SD 每天提醒
            /// </summary>
            public const string SD_CHINESE = "SD";
            /// <summary>
            /// SW 每周提醒
            /// </summary>
            public const string SW_CHINESE = "SW";
            /// <summary>
            /// SM 每月提醒
            /// </summary>
            public const string SM_CHINESE = "SM";
            /// <summary>
            /// SDH 定时提醒
            /// </summary>
            public const string SDH_CHINESE = "SDH";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string enumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] {SH, SD, SW, SM, SDH};
                string[] sReturnStr = new string[] { SH_CHINESE, SD_CHINESE, SW_CHINESE, SM_CHINESE, SDH_CHINESE };
                return BaseEntity.getStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string chineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SH_CHINESE, SD_CHINESE, SW_CHINESE, SM_CHINESE, SDH_CHINESE };
                string[] sReturnStr = new string[] { SH, SD, SW, SM, SDH };
                return BaseEntity.getStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
        /// <summary>
        /// 预约类型SC 客户预约 SS 系统提醒 
        /// </summary>
        public static class ENUM_SCHEDULETYPE
        {
            /// <summary>
            /// SC 客户预约 
            /// </summary>
            public const string SC = "SC";
            /// <summary>
            /// SS 系统提醒
            /// </summary>
            public const string SS = "SS";
            /// <summary>
            /// SE 员工提醒
            /// </summary>
            public const string SE = "SE";
            /// <summary>
            /// SC 客户预约 
            /// </summary>
            public const string SC_CHINESE = "SC";
            /// <summary>
            /// SS 系统提醒
            /// </summary>
            public const string SS_CHINESE = "SS";
            /// <summary>
            /// SE 员工提醒
            /// </summary>
            public const string SE_CHINESE = "SE";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string enumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { SC, SS, SE };
                string[] sReturnStr = new string[] { SC_CHINESE, SS_CHINESE, SE_CHINESE };
                return BaseEntity.getStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string chineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SC_CHINESE, SS_CHINESE, SE_CHINESE };
                string[] sReturnStr = new string[] { SC, SS, SE };
                return BaseEntity.getStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
    }
}
